<template>
  <div class="footer">
    <h1>我是footer</h1>
    <p>count为{{ count }}</p>
    <button @click="decrement">累减</button>
  </div>
</template>

<script>
import { mapMutations, mapState } from "vuex";
export default {
  name: "Footer",
  computed: {
    ...mapState(["count"]),
  },
  methods: {
    ...mapMutations(["decrement"]),
  },
};
</script>

<style scoped>
.footer {
  margin: 30px;
  background: yellowgreen;
}
</style>